package com.csun.cmny.provider.service.impl;

import com.csun.cmny.provider.dao.OldmanFeeMapper;
import com.csun.cmny.provider.model.dto.RechargeQueryDto;
import com.csun.cmny.provider.pojo.Oldman;
import com.csun.cmny.provider.pojo.OldmanFee;

import com.csun.cmny.provider.service.OldmanFeeService;
import com.csun.cmny.provider.vo.SettleDetailVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class OldmanFeeServiceImpl implements OldmanFeeService {
    @Resource
    private OldmanFeeMapper oldmanFeeMapper;


    @Override
    public int deleteByOldmanId(Integer key) {
        return oldmanFeeMapper.deleteByOldmanId(key);
    }

    @Override
    public int insert(OldmanFee record) {
//        int m= oldmanFeeMapper.insert(record);
        int m = oldmanFeeMapper.insertSelective(record);
        int n = record.getSettleId();
        return n;
    }

    @Override
    public int insertSelective(OldmanFee record) {
        return 0;
    }

    @Override
    public OldmanFee selectByPrimaryKey(Integer key) {
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(OldmanFee record) {
        return oldmanFeeMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(OldmanFee record) {
        return 0;
    }

    @Override
    public OldmanFee selectByOldmanId(Integer oldmanId) {
        return oldmanFeeMapper.selectByOldmanId(oldmanId);
    }

    @Override
    public List<Map<String, Object>> showAll(Map<String, Object> queryMap) {
        return oldmanFeeMapper.showAll(queryMap);
    }

    @Override
    public SettleDetailVo getSettleByOid(Integer oldmanId) {
        return oldmanFeeMapper.getSettleByOid(oldmanId);
    }

    @Override
    public List<SettleDetailVo> queryListWithPage(RechargeQueryDto rechargeQueryDto) {
        return oldmanFeeMapper.queryListWithPage(rechargeQueryDto);
    }
}
